home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / chklst / chklistw.exe / ChkList.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-03-05  |  6.2 KB  |  219 lines

  1. VERSION 5.00
  2. Object = "{D1D71990-5C1B-11CF-8E84-00AA006DB209}#1.0#0"; "Chklist.ocx"
  3. Begin VB.Form Form1 
  4.    Caption         =   "Form1"
  5.    ClientHeight    =   5415
  6.    ClientLeft      =   60
  7.    ClientTop       =   720
  8.    ClientWidth     =   5475
  9.    LinkTopic       =   "Form1"
  10.    PaletteMode     =   1  'UseZOrder
  11.    ScaleHeight     =   5415
  12.    ScaleWidth      =   5475
  13.    StartUpPosition =   2  'CenterScreen
  14.    Begin VB.CommandButton Command8 
  15.       Caption         =   "Check All"
  16.       Height          =   495
  17.       Left            =   4200
  18.       TabIndex        =   16
  19.       Top             =   2760
  20.       Width           =   1095
  21.    End
  22.    Begin VB.CommandButton Command7 
  23.       Caption         =   "UnCheck All"
  24.       Height          =   495
  25.       Left            =   4200
  26.       TabIndex        =   15
  27.       Top             =   2160
  28.       Width           =   1095
  29.    End
  30.    Begin VB.CommandButton Command6 
  31.       Caption         =   "CheckItem"
  32.       Height          =   375
  33.       Left            =   3720
  34.       TabIndex        =   14
  35.       Top             =   960
  36.       Width           =   1095
  37.    End
  38.    Begin VB.CommandButton Command5 
  39.       Caption         =   "Find Text"
  40.       Height          =   375
  41.       Left            =   3720
  42.       TabIndex        =   13
  43.       Top             =   1440
  44.       Width           =   1095
  45.    End
  46.    Begin VB.CommandButton Command4 
  47.       Caption         =   "Delete All"
  48.       Height          =   375
  49.       Left            =   960
  50.       TabIndex        =   11
  51.       Top             =   1440
  52.       Width           =   1095
  53.    End
  54.    Begin VB.CommandButton Command2 
  55.       Caption         =   "Delete Selected"
  56.       Height          =   375
  57.       Left            =   2160
  58.       TabIndex        =   8
  59.       Top             =   1440
  60.       Width           =   1455
  61.    End
  62.    Begin VB.TextBox Text4 
  63.       Height          =   285
  64.       Left            =   3360
  65.       TabIndex        =   6
  66.       Text            =   "Text4"
  67.       Top             =   4800
  68.       Width           =   735
  69.    End
  70.    Begin VB.TextBox Text3 
  71.       Height          =   285
  72.       Left            =   3360
  73.       TabIndex        =   4
  74.       Text            =   "Text3"
  75.       Top             =   4320
  76.       Width           =   735
  77.    End
  78.    Begin VB.CheckBox Check1 
  79.       Caption         =   "IsChecked"
  80.       Height          =   255
  81.       Left            =   960
  82.       TabIndex        =   3
  83.       Top             =   4320
  84.       Width           =   1095
  85.    End
  86.    Begin VB.TextBox Text2 
  87.       Height          =   285
  88.       Left            =   960
  89.       TabIndex        =   9
  90.       Text            =   "Text2"
  91.       Top             =   3840
  92.       Width           =   3135
  93.    End
  94.    Begin VB.CommandButton Command3 
  95.       Caption         =   "Add Text && Check"
  96.       Height          =   375
  97.       Left            =   2160
  98.       TabIndex        =   2
  99.       Top             =   960
  100.       Width           =   1455
  101.    End
  102.    Begin VB.CommandButton Command1 
  103.       Caption         =   "Add Text"
  104.       Height          =   375
  105.       Left            =   960
  106.       TabIndex        =   1
  107.       Top             =   960
  108.       Width           =   1095
  109.    End
  110.    Begin VB.TextBox Text1 
  111.       Height          =   285
  112.       Left            =   960
  113.       TabIndex        =   0
  114.       Text            =   "Another Line of text"
  115.       Top             =   600
  116.       Width           =   3135
  117.    End
  118.    Begin VB.Frame Frame1 
  119.       Caption         =   "When Selection Changes"
  120.       Height          =   1575
  121.       Left            =   720
  122.       TabIndex        =   12
  123.       Top             =   3600
  124.       Width           =   3615
  125.    End
  126.    Begin CHKLISTLib.ChkList ChkList1 
  127.       Height          =   1335
  128.       Left            =   990
  129.       TabIndex        =   10
  130.       Top             =   2055
  131.       Width           =   3135
  132.       _Version        =   65536
  133.       _ExtentX        =   5530
  134.       _ExtentY        =   2355
  135.       _StockProps     =   77
  136.       BackColor       =   12632256
  137.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  138.          Name            =   "MS Sans Serif"
  139.          Size            =   8.25
  140.          Charset         =   0
  141.          Weight          =   400
  142.          Underline       =   0   'False
  143.          Italic          =   0   'False
  144.          Strikethrough   =   0   'False
  145.       EndProperty
  146.    End
  147.    Begin VB.Label Label3 
  148.       Caption         =   "Index"
  149.       Height          =   255
  150.       Left            =   2640
  151.       TabIndex        =   7
  152.       Top             =   4800
  153.       Width           =   615
  154.    End
  155.    Begin VB.Label Label2 
  156.       Caption         =   "Count"
  157.       Height          =   255
  158.       Left            =   2640
  159.       TabIndex        =   5
  160.       Top             =   4320
  161.       Width           =   615
  162.    End
  163. Attribute VB_Name = "Form1"
  164. Attribute VB_GlobalNameSpace = False
  165. Attribute VB_Creatable = False
  166. Attribute VB_PredeclaredId = True
  167. Attribute VB_Exposed = False
  168. Private Sub ChkList1_SelectionChanged(ByVal Index As Integer)
  169. Text2.Text = ChkList1.GetString(Index)
  170. Text3.Text = ChkList1.GetCount
  171. Text4.Text = Index
  172. If ChkList1.IsChecked(Index) = True Then
  173.     Check1.Value = 1
  174.     Check1.Value = 0
  175. End If
  176. End Sub
  177. Private Sub Command1_Click()
  178. ChkList1.AddString (Text1.Text)
  179. End Sub
  180. Private Sub Command2_Click()
  181. Index = ChkList1.GetCurSel
  182. If Index > -1 Then
  183. ChkList1.DeleteItem (Index)
  184. End If
  185. End Sub
  186. Private Sub Command3_Click()
  187. ChkList1.AddStringCheck Text1.Text, True
  188. End Sub
  189. Private Sub Command4_Click()
  190. ChkList1.Clear
  191. End Sub
  192. Private Sub Command5_Click()
  193. n = 0
  194. 'n = ChkList1.FindString(Text1.Text)
  195. 'n = ChkList1.FindStringExact(Text1.Text)
  196. n = ChkList1.SelectString(Text1.Text)
  197. If n > -1 Then
  198. MsgBox ("Not Found")
  199. End If
  200. End Sub
  201. Private Sub Command6_Click()
  202. ChkList1.CheckItem ChkList1.GetCurSel
  203. End Sub
  204. Private Sub Command7_Click()
  205. ChkList1.UnCheckAll
  206. End Sub
  207. Private Sub Command8_Click()
  208. ChkList1.CheckAll
  209. End Sub
  210. Private Sub Form_Load()
  211. For i = 0 To 20
  212.     'If i Mod 2 = 0 Then
  213.     'ChkList1.AddString "Test" + Chr(9) + "Line " + Chr(85 - i)
  214.     'Else
  215.     ChkList1.AddStringCheck "Test Line " + Chr(85 - i), True
  216.     'End If
  217. Next i
  218. End Sub
  219.